package com.shop.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.shop.dao.ProductCategoryDao;
import com.shop.entity.ProductCategory;
import com.shop.service.ProductCategoryService;

@Service
@Transactional
public class ProductCategoryServiceImpl implements ProductCategoryService{
	
	@Autowired
	private ProductCategoryDao productCategoryDao;
	
	
	public ProductCategoryDao getProductCategoryDao() {
		return productCategoryDao;
	}

	public void setProductCategoryDao(ProductCategoryDao productCategoryDao) {
		this.productCategoryDao = productCategoryDao;
	}

	@Override
	public List<ProductCategory> findAllProductCategory() {
		
		return productCategoryDao.findAllProductCategory();
	}

	@Override
	public Serializable addProductCategory(ProductCategory productCategory) {
		return productCategoryDao.addProductCategory(productCategory);
		
	}

	@Override
	public Serializable deleteProductCategory(ProductCategory productCategory) {
		
		return productCategoryDao.deleteProductCategory(productCategory);
	}

	@Override
	public Serializable updateProductCategory(ProductCategory productCategory) {
		return productCategoryDao.updateProductCategory(productCategory);
	}

	@Override
	public ProductCategory selectProductCategory(ProductCategory productCategory) {
		return productCategoryDao.selectProductCategory(productCategory);
	}

}
